/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kmcsoft.goldshop.model.master;

import com.kmcsoft.emaster.entity.TrackableEntity;
import javax.jdo.annotations.FetchGroup;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.Unique;

/**
 *
 * @author kmcsoft02
 */
@PersistenceCapable(detachable = "true", table = "SHOP_Unit")
@FetchGroup(name = "detach_Unit_All", members = {
    @Persistent(name = "equivalentUnit")})
public class Unit extends TrackableEntity {

    @Persistent
    @Unique
    private String code;
    @Persistent
    @Unique
    private String name;
    @Persistent
    private double amount;
    @Persistent
    private Unit equivalentUnit;
    @Persistent
    private String note;
    @Persistent
    private boolean readonly;

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public Unit getEquivalentUnit() {
        return equivalentUnit;
    }

    public void setEquivalentUnit(Unit equivalentUnit) {
        this.equivalentUnit = equivalentUnit;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public boolean isReadonly() {
        return readonly;
    }

    public void setReadonly(boolean readonly) {
        this.readonly = readonly;
    }
    
}
